from django.conf.urls.defaults import *
from django.contrib import admin
from django.conf import settings
from django.views.decorators.cache import cache_page

# Admin urls
admin.autodiscover()

# Urls for catalog feed
urlpatterns = patterns('', url(r'^feeds/data/$', 'catalog.views.datafeed'),)

urlpatterns += patterns('',

	# Site start page
 	url(r'^$', include('blog.urls')),
	
	# Generic pages
	url(r'^page/', include('blog.pageurls')),	

	# Blog entries
 	url(r'^blog/', include('blog.urls')),	
		
	# Urls for the catalog application
	url(r'^data/', include('catalog.urls')),

	# The admin pages
	url(r'^admin/(.*)', admin.site.root),
	
)


# Server static files through Django if on a development machine
if hasattr(settings, 'STATIC_FILE_LOCATION'):
	urlpatterns += patterns('',	(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_FILE_LOCATION}), )


